<?php namespace system\database\migrations;
use houdunwang\database\build\Migration;
use houdunwang\database\build\Blueprint;
use houdunwang\database\Schema;
class CreateArticleTable extends Migration {
    //执行
	public function up() {
		Schema::create( 'article', function ( Blueprint $table ) {
			$table->increments( 'arc_id' );
            $table->timestamps();
			$table->string('arc_title',100)->defaults('')->comment('文件标题');
			$table->integer('arc_click')->unsigned()->defaults(0)->comment('点击次数');
			$table->string('arc_content',300)->defaults('')->comment('文章内容');
			$table->string('arc_description',200)->defaults('')->comment('文章描述');
			$table->string('arc_author',30)->defaults('')->comment('文章作者');
			$table->string('arc_linkurl',100)->defaults('')->comment('文章外部链接');
			$table->string('arc_source',100)->defaults('')->comment('文章来源');
			$table->string('arc_ishot',10)->defaults('')->comment('是否热门');
			$table->string('arc_recommend',10)->defaults('')->comment('是否推荐');
			$table->string('arc_sort',100)->defaults('')->comment('文章排序');
			$table->integer('cate_id')->unsigned()->defaults(0)->comment('栏目主键');
			$table->string('arc_keyword',10)->defaults('')->comment('微信关键词');
        });
    }

    //回滚
    public function down() {
        Schema::drop( 'article' );
    }
}